from django.conf.urls import patterns, include, url

from django.contrib import admin
from django.conf import settings
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    
    url(r'^media/(.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT}),
    
    # Login / Logout
    url(r'^accounts/login', 'django.contrib.auth.views.login'),
    url(r'^logout/', 'django.contrib.auth.views.logout', {'next_page': '/accounts/login/'}),
    
    url(r'^$', 'ctrlsys_revenda.views.home', name='home'),
    # url(r'^ctrlsys_revenda/', include('ctrlsys_revenda.foo.urls')),
    
    url(r'^configuracao/', include('configuracao.urls')),
    url(r'^revenda/', include('revenda.urls')),
)
